package com.wyait.manage.web.biz;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.wyait.manage.entity.biz.AreaVO;
import com.wyait.manage.service.biz.AreaService;

@Controller
@RequestMapping("/area")
public class AreaController {
	
	private static final Logger logger = LoggerFactory
			.getLogger(AreaController.class);
	@Autowired
	private AreaService areaService;
	@RequestMapping("/toAreaList")
	public ModelAndView toAreaList() {
		ModelAndView mv=new ModelAndView("/area/areaList");
		List<AreaVO> pvos = areaService.findAreas();
		mv.addObject("perms", pvos.toArray());
		return mv;
	}
}
